<?php

class Resource {
    //Http Response code
    const
    OK = 200,
    CREATED = 201,
    NOCONTENT = 204,
    MOVEDPERMANENTLY = 301,
    FOUND = 302,
    SEEOTHER = 303,
    NOTMODIFIED = 304,
    TEMPORARYREDIRECT = 307,
    BADREQUEST = 400,
    UNAUTHORIZED = 401,
    FORBIDDEN = 403,
    NOTFOUND = 404,
    METHODNOTALLOWED = 405,
    NOTACCEPTABLE = 406,
    GONE = 410,
    LENGTHREQUIRED = 411,
    PRECONDITIONFAILED = 412,
    UNSUPPORTEDMEDIATYPE = 415,
    INTERNALSERVERERROR = 500;

    var $raw_body;
    var $response_code = Resource::OK;
    var $data = array();

    public function get_raw_body() {
        return $this->raw_body;
    }

    public function set_raw_body($raw_body) {
        $this->raw_body = $raw_body;
    }

    public function get_response_code() {
        return $this->response_code;
    }

    public function set_response_code($response_code) {
        $this->response_code = $response_code;
    }

    public function get_data() {
        return $this->data;
    }

    public function set_data($data) {
        $this->data = $data;
    }

}

?>
